﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Fcdbas.Core;
using Fcdbas.WinUI.Forms;

namespace Fcdbas.WinUI.Controls
{
    public class cBlobEdit : cButtonEdit
    {
        public cBlobEdit()
        {
            this.Properties.ReadOnly = true;
            
        }
        public override bool ReadOnly
        {
            get
            {
                return true;
            }
            set
            {
                

            }
        }
        public void BlobContentChange(EventArgs e)
        {
            this.OnTextChanged(e);
        }
        protected override void OnClickButton(DevExpress.XtraEditors.Drawing.EditorButtonObjectInfoArgs buttonInfo)
        {
            if (this.OwningDataSourceBinding == null)
                return;
            IEntity en = this.OwningDataSourceBinding.Current as IEntity;
            if (en == null)
                return;
            
            dlgRichEdit dlg = new dlgRichEdit(en, this.DataColumn.ColumnName + "_db", this);
            dlg.ShowDialog();
            base.OnClickButton(buttonInfo);
        }
    }
}
